﻿using furion.blog.Domain.Shared.ValidateAttribute;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace furion.blog.Domain.Shared.Dto.User
{
    public class UserProfileUpdateDto
    {
        /// <summary>
        /// 账号ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 更新的人
        /// </summary>
        public long UpdatedBy { get; set; }

        [JsonProperty(PropertyName = "realName")]
        [Required(ErrorMessage = "请填写真实姓名")]
        public string RealName { get; set; }

        [JsonProperty(PropertyName = "nickName")]
        public string NickName { get; set; }

        [JsonProperty(PropertyName ="phone")]
        [Required(ErrorMessage = "请填写电话")]
        public string Phone { get; set; }

        [JsonProperty(PropertyName = "email")]
        [EmailValidateAttribute]
        public string Email { get; set; }

        [JsonProperty(PropertyName = "avatar")]
        public string Avatar { get; set; }

        [JsonProperty(PropertyName ="sex")]
        [Required(ErrorMessage = "请选择性别")]
        [SexValidateAttribute]
        public string Sex { get; set; }



    }
}
